package cn.iocoder.yudao.module.erp.controller.app.contract;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.erp.controller.admin.contract.vo.ContractRespVO;
import cn.iocoder.yudao.module.erp.service.contract.ContractService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;


import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



@Tag(name = "APP - 合同信息")
@RestController
@RequestMapping("/erp/app/contract")
@Validated
public class AppContractController {

    @Resource
    private ContractService contractService;

    @GetMapping("/get")
    @Operation(summary = "获得合同信息")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    public CommonResult<ContractRespVO> getContract(@RequestParam("id") Long id) {
        return success(contractService.getContract(id));
    }
}